<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="userList.title"/></title>
    <meta name="heading" content="<fmt:message key='userList.heading'/>"/>
    <meta name="menu" content="AdminMenu"/>
</head>


<div class="jquery_tab_container">
    <span class="heading_tab advanced_link active tab1"><fmt:message key="admin.users"/></span>
</div>

<div class="jquery_tab">
    <div class="content_block"></div>
    <div id="search" class="right">


        <form method="get" action="${ctx}/admin/users" id="searchForm" name="searchForm">

            <input type="text" size="20" id="queryx" value="${param.q}"
                   placeholder="<fmt:message key="button.codexsearch"/>" class="input-medium left" style="margin-right: 10px;"/>
             <input type="hidden" id="queryh" name="q" />
             <script>
                 var searchq = jQuery("#queryx");
                 var textx = searchq.val();
                 searchq.val(decodeURIComponent(textx.replace(/\+/g,  " ")));
                 </script>

            <input type="button" class="button" onclick="javascript: submitform();" value="<fmt:message key="button.search"/>"/>
        </form>
    </div>
<br /> <br />
<display:table name="userList" cellspacing="0" cellpadding="0" requestURI="" 
    defaultsort="1" id="users" pagesize="25" class="table" export="false">
    <display:column property="username" escapeXml="true" sortable="true" titleKey="user.username" style="width: 25%"
        url="/userform?from=list" paramId="id" paramProperty="id"/>
    
    <display:column sortProperty="enabled" sortable="true" titleKey="user.enabled" style="width: 16%; padding-left: 15px" media="html">
        <input type="checkbox" disabled="disabled" <c:if test="${users.enabled}">checked="checked"</c:if>/>
    </display:column>
    <display:column property="enabled" titleKey="user.enabled" media="csv xml excel pdf"/>

    <display:setProperty name="paging.banner.item_name" value="user"/>
    <display:setProperty name="paging.banner.items_name" value="users"/>

    <display:setProperty name="export.excel.filename" value="User List.xls"/>
    <display:setProperty name="export.csv.filename" value="User List.csv"/>
    <display:setProperty name="export.pdf.filename" value="User List.pdf"/>
</display:table>

</div>
<input class="button" type="button" style="margin-right: 5px"  onclick="location.href='<c:url value="/userform?method=Add&from=list"/>'" value="<fmt:message key="button.add"/>"/>
<input class="button" type="button" onclick="location.href='<c:url value="/menuAdmin"/>'" value="<fmt:message key="button.done"/>"/>

<script type="text/javascript">
    highlightTableRows("users");
</script>
